package com.lgx.mall.view.entity;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

import com.lgx.common.entity.IdGenerator;

/**
 * 前台菜单功能分类
 * 
 * @author hz
 *
 */
@Entity
@Table(name="TV_GATEWAYCATEGORY")
public class GatewayCategory implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 8398087666669716646L;

	@Id
	@GeneratedValue(strategy=GenerationType.TABLE,generator=IdGenerator.GATEWAYCATEGORY_ID_GENERATOR)
	@TableGenerator(
			name = IdGenerator.GATEWAYCATEGORY_ID_GENERATOR,
			table = IdGenerator.GENERATOR_TABLE,
			pkColumnName = IdGenerator.GEN_NAME,
			pkColumnValue = IdGenerator.GATEWAYCATEGORY_ID_GENERATOR,
			valueColumnName = IdGenerator.GEN_VALUE,
			initialValue = 1,
			allocationSize = 1
	)
	private long id;
	
	private String name;
	
	private String description;
	
	@ManyToOne
	@JoinColumn(name="parent")
	private GatewayCategory parent;
	
	/**
	 * 最大个数
	 */
	private Integer count;
	
	/**
	 * 是否叶子节点
	 */
	private Boolean isleaf;
	
	/**
	 * 0商品、1品牌、2广告、3新闻、4公告、5规则、6商家、7说明、8分类
	 */
	private String type;
	
	private String area;
	
	/**
	 * 说明
	 */
	private String content;
	
	private String isDelete;

	public String getIsDelete() {
		return isDelete;
	}

	public void setIsDelete(String isDelete) {
		this.isDelete = isDelete;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getArea() {
		return area;
	}

	public void setArea(String area) {
		this.area = area;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public GatewayCategory getParent() {
		return parent;
	}

	public void setParent(GatewayCategory parent) {
		this.parent = parent;
	}

	public Integer getCount() {
		return count;
	}

	public void setCount(Integer count) {
		this.count = count;
	}

	public Boolean getIsleaf() {
		return isleaf;
	}

	public void setIsleaf(Boolean isleaf) {
		this.isleaf = isleaf;
	}
}
